import {get, post} from '../fetch'

// 【match】--获取列表
export const getJdMatchList = (params) => get('jdMatch/getList', params)
// 【match】--新增数据
export const saveJdMatch = (params) => post('jdMatch/save', params)
// 【match】--更新数据
export const editJdMatch = (params) => post('jdMatch/edit', params)
// 【match】--删除数据
export const deleteJdMatch = (data) => post('jdMatch/delete/' + data, data)

// 【match】--比赛审核
export const checkMatch = (params) => post('jdMatch/checkMatch', params)

// 【thirdMatch】--获取列表
export const getThirdMatchList = (params) => get('jdMatch/getThirdMatchList', params)
// 【OnMatch】--获取列表
export const getOnMatchList = (params) => get('jdMatch/getOnMatchList', params)
// 【MatchFormat】--获取列表
export const getMatchFormatList = (params) => get('jdMatchFormat/getFormatList', params)
// 【MatchFormat】--获取列表(_分页)
export const getFormatListPage = (params) => get('jdMatchFormat/getFormatListPage', params)
// 【JdLiveRecord】--获取分配直播间列表(_分页)
export const getFormatLiveListPage = (params) => get('jdLiveRecord/getFormatLiveListPage', params)
// 【JdLiveRecord】--获取分配直播间列表
export const getFormatLiveList = (params) => get('jdLiveRecord/getLiveListByFormatId', params)
// 【MatchFormat】--新增赛程
export const saveMatchFormat = (params) => get('jdMatchFormat/save', params)
// 【MatchFormat】--编辑赛程
export const editMatchFormat = (params) => get('jdMatchFormat/edit', params)
// 【MatchFormat】--删除赛程
export const deleteMatchFormat = (data) => get('jdMatchFormat/delete/' + data, data)
// 【MatchScore】--获取列表
export const getMatchScoreList = (params) => get('jdMatchScoreRecord/getScoreList', params)
// 【MatchScore】--晋级
export const handlePromotion = (params) => post('jdMatchScoreRecord/handlePromotion', params)

// 【JdLiveRecord】--新增赛程
export const saveFormatLive = (params) => post('jdLiveRecord/save', params)
// 【JdLiveRecord】--编辑赛程
export const editFormatLive = (params) => post('jdLiveRecord/edit', params)
// 【JdLiveRecord】--删除赛程
export const deleteFormatLive = (data) => post('jdLiveRecord/delete/' + data, data)

// 赛事项目
// 【matchItem】--获取列表
export const getJdMatchItemList = (params) => get('jdMatchItem/getList', params)
//赛事视图
export const getViewMatchItemList = (params) => get('viewMatchItem/getList', params)
//赛事视图
export const getCheckList = (params) => get('viewMatchItem/getCheckList', params)
//通过分类id查询项目（不分页）
export const getListByTypeId = (params) => get('jdMatchItem/getListByTypeId', params)
//通过分类id查询项目（分页）
export const getListByTypeIdPage = (params) => get('jdMatchItem/getListByTypeIdPage', params)
// 【matchItem】--新增数据
export const saveJdMatchItem = (params) => post('jdMatchItem/save', params)
// 【matchItem】--更新数据
export const editJdMatchItem = (params) => post('jdMatchItem/edit', params)
// 【matchItem】--删除数据
export const deleteJdMatchItem = (data) => post('jdMatchItem/delete/' + data, data)
//赛事类型
// 【matchType】--获取列表
export const getJdMatchTypeList = (params) => get('jdMatchType/getList', params)
// 【matchType】--新增数据
export const saveJdMatchType = (params) => post('jdMatchType/save', params)
// 【matchType】--更新数据
export const editJdMatchType = (params) => post('jdMatchType/edit', params)
// 【matchType】--删除数据
export const deleteJdMatchType = (data) => post('jdMatchType/delete/' + data, data)


// 【formatLiveUser】--获取已分配参赛人员(_分页)
export const getFormatLiveUserList = (params) => get('formatLiveUser/getFormatLiveUserList', params)
// 【formatLiveUser】--获取已分配参赛团队(_分页)
export const getFormatLiveUserListGroup = (params) => get('formatLiveUser/formatMemberListGroup', params)
// 【formatLiveUser】--获取团队下的参赛人员列表(_分页)
export const getFormatMemberListByGroupId = (params) => get('formatLiveUser/formatMemberListByGroupId', params)
// 【formatLiveUser】--获取分配参赛员-单人(_分页)
export const getformatMemberList = (params) => get('formatLiveUser/formatMemberList', params)
// 【jdMatchLiveUser】--删除用户
export const deleteFormatLiveUser = (data) => get('jdMatchLiveUser/delete/' + data, data)
// 【formatLiveUser】--删除组别
export const handleDeleteGroupLiveUser = (params) => post('/formatLiveUser/delFormatMemberListGroup', params)
// 【formatLiveUser】--删除用户
export const handleDeleteLiveUser = (params) => post('/formatLiveUser/delFormatMemberList', params)
// 【formatLiveUser】--分配参赛员
export const setMatchLiveUser = (params) => post('formatLiveUser/setMatchLiveUser', params)
// 【formatLiveUser】--获取分配直播间列表(_分页)
export const getFormatLiveRecordList = (params) => get('formatLiveUser/getFormatLiveRecordList', params)

// 【JdMatchScoreRecord】--弃赛
export const giveUpFormatList = (data) => post('/api/match/score/score', data )
